<template>
  <div class="view-container">
    <el-form ref="upData" :model="upData" label-width="80px">
      <el-form-item label="标题：">
        <el-input v-model="upData.infoTitle"></el-input>
      </el-form-item>

      <el-form-item label="文号：">
        <el-input v-model="upData.infoCode"></el-input>
      </el-form-item>

      <el-form-item label="用途：">
        <el-input v-model="upData.infoUse"></el-input>
      </el-form-item>
      <el-row>
        <el-col :span="5">
          <el-form-item label="分类：">
            <el-select v-model="upData.infoType">
              <el-option label="下传" value="下传"></el-option>
              <el-option label="上报" value="上报"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="时间：">
            <div class="block">
              <span class="demonstration"></span>
              <el-date-picker
                v-model="upData.created"
                type="datetime"
                placeholder="选择日期时间">
              </el-date-picker>
            </div>
          </el-form-item>
        </el-col>
        <el-col :span="8">

          <el-form-item label="权限：">
            <el-radio-group v-model="upData.shareType">
              <el-radio :label="3">全部</el-radio>
              <el-radio :label="2">科室</el-radio>
              <el-radio :label="1">个人</el-radio>
              <el-radio :label="0">私人</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item>
      <Tinymce v-model="upData.infoContent"/>
      </el-form-item>



      <el-form-item>
        <el-button type="primary" @click="updateHuis">保存</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import huizongsel from "@/api/huizongChakan/huizongsel";
  import Tinymce from "@/components/Tinymce";
  export default {
    name: "",
    components: {
      Tinymce,
    },
    data() {
      return {
          id:  this.$router.id,

        upData:{},
      }
    },
    created() {
    this.updaLs()
    },
    methods: {
      updaLs(){
        huizongsel.huizongUpAlls(this.id).then(res=>{
          this.upData = res
          console.log(res)
        })
      },

      updateHuis(){
        huizongsel.updateHui(this.upData,this.id).then(res=>{
          console.log('修改成功')
          this.$message.success("修改成功");
        })
      },



    }
  }
</script>

<style scoped lang="scss">

</style>
